<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>用户列表 - Remote MySQL</title>
        <link rel="stylesheet" type="text/css" href="{$Think.__APP_PUBLIC__}/css/reset.css">
        <link rel="stylesheet" type="text/css" href="{$Think.__APP_PUBLIC__}/css/public.css">
        <script language="javascript" type="text/javascript" src="{$Think.__APP_PUBLIC__}/js/jquery-1.8.2.js"></script>
        <script language="javascript" type="text/javascript" src="{$Think.__APP_PUBLIC__}/js/{$Think.MODULE_NAME}/user_list.js"></script>
        <script language="javascript" type="text/javascript">
            var HOST_NAME = "{$Think.HOST_NAME}";
			var URL = "__URL__";
			var user_status = "{$_GET['user_status']}";
        </script>
    </head>

    <body>
        <include file="Base:head" />
        <div>
    		<fieldset>
                <legend align="center">&nbsp;用户列表 - Remote MySQL&nbsp;</legend>
				<div class="filter_area">
					<label for="user_status">按状态筛选：</label>
					<select id="user_status">
						<option value="all" selected="selected">全部</option>
						<option value="usable">可用</option>
						<option value="unusable">已禁用</option>
					</select>
				</div>
                <table class="rmt_table">
                    <tr class="title">
						<td width="18%">昵称</td>
                        <td width="18%">用户名</td>
						<td width="34%">注册时间</td>
                        <td width="30%">操作</td>
                    </tr>
                    <volist name="PAGE['data']" id="vo">
					<if condition="$vo['useable'] eq 0">
					<tr style="background-color: #F1ECCE;">
					<else/>
					<tr>
					</if>
						<td>{$vo['nickname']}</td>
						<td>
                            <span>
								{$vo['user_name']}<if condition="$vo['power'] eq 1">（管理员）</if>
							</span>
                        </td>
						<td>{$vo['register_time_str']}</td>
                        <td>
							<if condition="$vo['power'] eq 1">
								<a href="javascript:void(0);" class="disable">禁用</a>
								<a href="javascript:void(0);" class="disable">删除</a>
							<else/>
								<if condition="$vo['useable'] eq 0">
									<a href="__URL__/unban_user?user_id={$vo['id']}&user_status={$_GET['user_status']}">启用</a>
								<else/>
									<a href="__URL__/ban_user?user_id={$vo['id']}&user_status={$_GET['user_status']}">禁用</a>
								</if>
								<a href="__URL__/del_user?user_id={$vo['id']}&user_status={$_GET['user_status']}">删除</a>
							</if>
						</td>
                    </tr>
                    </volist>
                </table>
				<div class="pagelist_area">
					<include file="Base:pagelist" />
				</div>
            </fieldset>
        </div>
    </body>
</html>
